Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Data Types


Path Structures

You use the gxPath structure to specify a single contour composed of straight lines and curves.

The gxPath structure is defined as follows:

struct gxPath {
   long           vectors;
   long           controlBits[gxAnyNumber];
   struct gxPoint vector[gxAnyNumber];
};
Field Description
vectors
The number of geometric points in the contour.
controlBits
Bit flags that indicate which geometric points are on curve and which are off-curve control points.
vector
The coordinates of the geometric points.
The array index gxAnyNumber indicates that the gxPath data structure is a variable-length structure--it can include any number of geometric points

Each bit in the array specified in the controlBits field indicates whether a particular point in the array specified by the vector field is on curve or off curve. A value of 0 indicates that the corresponding point is on curve and a value of 1 indicates that the corresponding point is off curve.

The gxPaths structure allows you to group multiple path contours together. You use this data structure when specifying the geometry of a path shape.

The gxPaths structure is defined as follows:

struct gxPaths {
   long          contours;
   struct gxPath contour[gxAnyNumber];
};
Field Description
contours
The number of path contours.
contour
The path contours.
The array index gxAnyNumber indicates that the gxPaths data structure is also a variable-length structure--it can include any number of path contours.

Implementation Note
In version 1.0 of QuickDraw GX, a single path contour can have between 0 and 32,767 geometric points. The geometry of a path shape can between 0 and 32,767 polygon contours. The total size of a path geometry may not exceed 2,147,483,647 bytes.
For more information about paths and path shapes, see "Path Shapes" on page 2-25.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help